package com.example.springsecurity.service;

import com.example.springsecurity.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName AssignExperimentService
 * @Description TODO
 * @Author lvyongwei
 * @Date 2020-10-12 16:17
 **/
public interface AssignExperimentService {

    /**
     * 布置实验,添加布置信息
     * @param assignExperiment
     * @return
     */
    public boolean assignExperiment(AssignExperiment assignExperiment);

    /**
     * 查看当前教师/负责人布置的所有布置
     * @param userId
     * @param assignName
     * @param projectId
     * @return
     */
    public List<CheckAssign> getAllCheckAssign(Long userId,String assignName,Integer projectId);

    /**
     * 根据布置id获取指定布置的详情
     * @param assignId
     * @return
     */
    public AssignDetails getAssignDetails(Long assignId);

    /**
     * 修改布置
     * @param assignExperiment 布置实体
     * @return
     */
    public boolean updateAssign(AssignExperiment assignExperiment);

    /**
     * 删除布置
     * @param assignId
     * @return
     */
    public boolean deleteAssign(Long assignId);


    /**
     * 获取批改列表,包括全部已批改未批改
     * @param realName
     * @param correctStatus
     * @param assignId
     * @return
     */
    public List<TeacherCorrectScore> getAllTeacherCorrect(String realName,Integer correctStatus,Long assignId);

    /**
     * 教师批改用户提交成绩展示页面
     * @param submitId
     * @return
     */
    CorrectUser getMustScore(@Param("submitId") Integer submitId);

    /**
     * 批改实验结果,并改变布置状态为已批改
     * @param teacherCorrectScore
     * @return
     */
    boolean correctResult(TeacherCorrectScore teacherCorrectScore);

    /**
     * 根据提交id和布置id获取批改分数
     * @param assignId
     * @param submitId
     * @return
     */
    public TeacherCorrectScore getTeacherCorrectScore(@Param("assignId") Long assignId,@Param("submitId") Integer submitId);

    /**
     * 撤销批改
     * @param assignId
     * @param submitId
     * @param userName
     * @return
     */
    public boolean repealCorrect(@Param("assignId") Long assignId,@Param("submitId") Integer submitId,@Param("userName") String userName);

    /**
     * 导出成绩
     * @param assignId
     * @return
     */
    public List<ExportScore> exportTeacherCorrect(@Param("assignId") Long assignId);

    /**
     * 根据布置id获取指定布置的详情
     * @param assignId
     * @return
     */
    public AssignDetails getAssignDetail(Long assignId);
}
